package model;

import java.awt.Color;
import java.awt.image.BufferedImage;

import service.Service;
import dao.Field;

public class MegaSuperMob extends Mob{

	private final static int ownHp = 10;
	private static final int ownSpeed = 1;
	private static final Color black = Color.BLACK;
	private static BufferedImage ownImg = null;


	public MegaSuperMob(Location location) {
		super(location, ownHp, ownSpeed);
		this.setColor(black);

	}


	@Override
	public void readPic() {
		// TODO Auto-generated method stub

	}


	@Override
	public Location movement(Field field) {

		Location loc = this.getLocation();
		
		if(this.isAlive() != false){
			int tmpCol = loc.getCol();
			int tmpRow = loc.getRow();

			if(field.getObjectAt(tmpRow+1,tmpCol)!=null){
				Location newlocation = new Location(tmpRow,tmpCol+ownSpeed);
				this.setLocation(newlocation);
				field.clearLocation(loc);
				loc = newlocation;
				
				
			}else{
				Location newlocation = new Location(tmpRow+ownSpeed,tmpCol);
				this.setLocation(newlocation);
				field.clearLocation(loc);
				loc = newlocation;
				

			}



		}
		return loc;
	}

}


